﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AimGameLibrary.GameObject
{
    public class GameSubtractValue : GameOperators
    {
        protected override void Logic()
        {
            base.Logic();
            if (Listparent[0].GetType() == typeof(GameInt))
            {
                GameInt temp1 = (GameInt)Listparent[0];
                if (Listparent[1].GetType() == typeof(GameInt))
                {
                    GameInt temp2 = (GameInt)Listparent[1];
                    temp1.MyinT -= temp2.MyinT;
                }
                else if (Listparent[1].GetType() == typeof(GameFloat))
                {
                    GameFloat temp2 = (GameFloat)Listparent[1];
                    temp1.MyinT -= Convert.ToInt32(temp2.MyfloaT);
                }
            }
            else if (Listparent[0].GetType() == typeof(GameFloat))
            {
                GameFloat temp1 = (GameFloat)Listparent[0];
                if (Listparent[1].GetType() == typeof(GameInt))
                {
                    GameInt temp2 = (GameInt)Listparent[1];
                    temp1.MyfloaT -= temp2.MyinT;
                }
                else if (Listparent[1].GetType() == typeof(GameFloat))
                {
                    GameFloat temp2 = (GameFloat)Listparent[1];
                    temp1.MyfloaT -= temp2.MyfloaT;
                }
            }
        }
    }
}
